<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>菜单管理</title>
	<%@ include file="/WEB-INF/include/include.jsp" %>
	<script type="text/javascript" src="<%=path %>/js/sysmgr/menu/menu.js"></script>
  </head>
  <body>
  		<div class="listpage-locked-content">
			<h2 class="listpage-lk-title" >菜单管理</h2>
			<div class="listpage-lk-search" id="searchWrap" ></div>			
			<div class="listpage-lk-tbar" id="tbarWrap"></div>
		</div>
		<div class="ltrgpage-content" id="pagecontent"></div>
<ui:page>

  	<ui:model name="GrildMenuModel">
  		 <x:attr name="fields" type="array">
  			<ui:model.field name="MENU_ID"   ></ui:model.field>
  			<ui:model.field name="MENU_CODE"  ></ui:model.field>
  			<ui:model.field name="MENU_NAME"  ></ui:model.field>
  			<ui:model.field name="MENU_IMG_CLS"  ></ui:model.field>
  			<ui:model.field name="MENU_ORDER"  ></ui:model.field>
  			<ui:model.field name="MENU_TYPE"  ></ui:model.field>
  			<ui:model.field name="MENU_URL"  ></ui:model.field>
  			<ui:model.field name="MENU_PARENT_ID"  ></ui:model.field>
  			<ui:model.field name="C_STATUS" defaultValue="1"  ></ui:model.field>
  			<ui:model.field name="C_REMARK"   ></ui:model.field>
  			<ui:model.field name="MENU_HANDLER"   ></ui:model.field>
  		</x:attr>
  	</ui:model>


	<ui:b_toolbar menuCode="menuMenu" id="toolbar" renderTo="tbarWrap" ></ui:b_toolbar>
	<ui:quicksearch handler="MenuList.quickSearch" scope="MenuList"renderTo="searchWrap"></ui:quicksearch>
	
	<ui:searchform id="menuSearchForm">
		<x:items>
			<ui:formPanel.text id="MENU_NAME" fieldLabel="名称包含" config="true"></ui:formPanel.text>
			<ui:formPanel.text id="MENU_CODE" fieldLabel="编码包含" config="true"></ui:formPanel.text>
			<ui:formPanel.comboxstatic id="MENU_TYPE" fieldLabel="类型" data="[['1','菜单'],['0','按钮']]" config="true"></ui:formPanel.comboxstatic>
			<ui:formPanel.text id="MENU_URL" fieldLabel="URL包含" config="true"></ui:formPanel.text>
			<ui:formPanel.text id="C_REMARK" fieldLabel="备注包含" config="true"></ui:formPanel.text>
			<ui:formPanel.comboxstatic id="C_STATUS" fieldLabel="状态" data="[['1','启用'],['0','停用']]" config="true"></ui:formPanel.comboxstatic>
		</x:items>
	</ui:searchform>
	
	<ui:advSearchWindow searchFormId="menuSearchForm" id="advSearchWin" 
		searchHandlerscope="MenuList" searchHandler="MenuList.advSearch" 
		height="240" width="300"/>	
	
	<ui:panel layout="border" renderTo="pagecontent" height="460">
		<x:items>
			<ui:tree id="menuTree"  datasetName="MenuDataSetHandler"  width="200" title="系统菜单"
				model="TreeNodeModel" handlerName="MenuQueryHandler"  config="true" rootVisible="true" rootID="0" rootText="系统菜单"
				handlerMethod="getChildrenForTree"    >
				<x:attr name="region" type="string">west</x:attr>
				<x:listeners>
					<x:handler name="itemclick" funcName="MenuList.itemclick"></x:handler>
				</x:listeners>
			</ui:tree>
			<ui:grid id="menuGrid"  config="true"  showPaging="false"
				conditions='[{fieldName:\'id\',value:\'0\'}]'
				datasetName="MenuDataSetHandler" 
				model="GrildMenuModel" 
				handlerName="MenuQueryHandler" 
				handlerMethod="getChildrenForGrid"   >
				<x:attr name="region" type="string">center</x:attr>
				<x:attr name="columnLines">true</x:attr>
				<x:columns>
					<ui:gridcolumn dataIndex="MENU_ID" hidden="true" ></ui:gridcolumn>
					<ui:gridcolumn dataIndex="MENU_PARENT_ID" hidden="true"/>
					<ui:gridcolumn text="序号" dataIndex="MENU_ORDER"/>
					<ui:gridcolumn text="菜单编码" dataIndex="MENU_CODE"/>
					<ui:gridcolumn text="菜单名称" dataIndex="MENU_NAME"/>
					<ui:gridcolumn text="图标样式" dataIndex="MENU_IMG_CLS"/>
					<ui:gridcolumn text="菜单类型" dataIndex="MENU_TYPE" renderer="MenuList.renderMenutype"  />
					<ui:gridcolumn text="菜单URL" dataIndex="MENU_URL"/>
					<ui:gridcolumn text="handler" dataIndex="MENU_HANDLER"/>
					<ui:gridcolumn text="状态" dataIndex="C_STATUS" renderer="MenuList.statusRender"  />
					<ui:gridcolumn text="备注" dataIndex="C_REMARK"/>
				</x:columns>
			</ui:grid>
			
		</x:items>
	</ui:panel>

</ui:page>

  </body>
</html>




